package com.yaowk.system.model;

import com.yaowk.system.model.base.BasePlatform;

import java.util.List;

/**
 * Created by yaowk on 2017/4/18.
 */
public class Platform extends BasePlatform<Platform> {

    public static final Platform dao = new Platform();

    /**
     * 查询平台列表
     *
     * @return
     */
    public List<Platform> findPlatform() {
        return find(getSql("platform.selectPlatform"));
    }

    /**
     * 通过模块id查询互动的平台
     *
     * @param moduleId
     * @return
     */
    public List<Platform> findByModuleId(Integer moduleId) {
        return find(getSql("platform.selectByModuleId"), moduleId);
    }

    /**
     * 查询系统平台
     *
     * @return
     */
    public Platform findSystem() {
        return findFirst(getSql("platform.selectSystem"));
    }
}
